< bond atomRefs2="a4 a4" order="1" / >

User 62a37f4796

16-02-2016 14:35:48

Hi,


We asked our students to draw the isopropoxide anion in Marvin JS. Most of the students did fine, but one came back with what appears to be an atom bonded to itself in the MRV (the rest of the structure was perfectly fine):


  <bond atomRefs2="a4 a4" order="1"/>


If I'm reading this correctly atom a4 is bonded to itself with a single bond. As a chemist, this puzzles me a bit.


What is this meant to be from a Marvin JS perspective? How is it even possible to create it?


I've attached my version and the student's version here so you can look into it. JChem didn't think these structure were the same, so the student lost points on the exam. I'm hoping you can provide me some rationale as to why Marvin JS reported it this way.


 


Thanks,


   Michiel

ChemAxon f052bdfe3c

18-02-2016 19:49:10

Hi Michiel,


May I ask with which program (and version) the instructor formula and the student answer have been generated? Can you explain how these file was generated. Did you get them directly from Marvin JS or you convert them with another program somehow? 


Thanks,


Efi

User 62a37f4796

19-02-2016 14:03:48

Both were created with Marvin JS. The "About" function tells me: 15.8.9-pre2-edu (r29a1f12025e6+) with a build date of 2015-08-07 08:14.


This would be consistent with the CML declaration in the files of: <cml version="ChemAxon file format v5.10.0, generated by v15.8.9">


They were exported directly from Marvin JS; I'd have to ask an engineer exactly what function call was used since I don't have access to that information directly.


As far as I know only Marvin JS and JChem ever handle these files. We no longer use molconvert, and we don't use any other conversion programs. My engineer tells me that the files I submitted are the raw MRV that Marvin JS produced.


Does any of this help?


Thanks,


   Michiel

User 62a37f4796

19-02-2016 14:05:17

By the way, we have another student this happened to: also this additional weird extra bond in the MRV. So this is not just  an isolated case anymore.

ChemAxon f052bdfe3c

19-02-2016 16:10:39

Hi Michiel,


Is there any chance that somebody could ask the students how they draw the structure? This issue really bothering us, since as you mentioned there is no sense to generate this kind of bond and we are convinced that it is not possible in our model. But seeing this file, we are certainly wrong. So, any help which could identify the root of this behaviour is highly appreciated. (We could not reproduce this behaviour  however tried it in several ways  and nobody else reported it so far.) 


The other strange part and that is way I asked about the process which created this file that Marvin JS does not write the information into the  cml tag. And if we did, we would do it differently. Is there any chance that we can take a look at your system (even on a TC), we can discuss the details in email.


Best regards,


Efi

User 62a37f4796

19-02-2016 21:13:27

I have 2 students who got points taken off for undeservedly getting the answer wrong on an exam. I've asked if they could possibly describe how they got to their answers, but I have yet to hear back.


I'll take the rest of the discussion off-line.


Thanks,


   Michiel

User 870ab5b546

21-02-2016 00:37:45

When you have the answer to how the students drew the structure with the atom making a bond to itself, please post it here.

ChemAxon f052bdfe3c

01-03-2016 08:36:07

We are still not able to reproduce this bug, if we have more information how the students drew this structure, we will post it here.


Best regards,


Efi

User 62a37f4796

24-08-2016 12:13:35

Sorry for the long delay. We have new students now and we think we've narrowed this down to the use of ctrl-Z. This happened when students were drawing resonance forms of naphthalene. When a student accidentally clicked next to instead of on a bond to make it a double bond and then used ctrl-Z to undo it, a tag with an atom bonding to itself was left behind.


I'm still not sure what part of the architecture is triggering this, but we have been able to reproduce this using the description from the student. I know we use onChange to pull the XML from Marvin JS, but not much beyond that.


Is this of any help at all?

User 870ab5b546

24-08-2016 14:28:56

Can you post the MRV of the drawing on which this action produces the observed result? Also, what browser and system are you using? I can't reproduce the behavior in Safari on Mac. 

User 62a37f4796

24-08-2016 15:21:27

The MRV I'm getting directly from the Marvin JS editor reads like this (line breaks inserted by me for readability; the raw MRV is attached):


<cml>

<MDocument>

<MChemicalStruct>

<molecule molID="m1">

<atomArray>

<atom id="a1" elementType="C" x2="-3.2500933333325848" y2="2.123426654345919"/>

<atom id="a2" elementType="C" x2="-4.583639989330879" y2="1.35342666050592"/>

<atom id="a3" elementType="C" x2="-4.583639989330879" y2="-0.1867599938392539"/>

<atom id="a4" elementType="C" x2="-3.2500933333325848" y2="-0.9567599876792539"/>

<atom id="a5" elementType="C" x2="-1.9163600106691203" y2="-0.1867599938392539"/>

<atom id="a6" elementType="C" x2="-1.9163600106691203" y2="1.35342666050592"/>

<atom id="a7" elementType="C" x2="-0.5825523629408982" y2="-0.9567599989041576"/>

<atom id="a8" elementType="C" x2="0.751093630727484" y2="-0.18693207150082758"/>

<atom id="a9" elementType="C" x2="0.7511869710125931" y2="1.3531148621294808"/>

<atom id="a10" elementType="C" x2="-0.5826206767156292" y2="2.123265554581735"/>

</atomArray>

<bondArray>

<bond atomRefs2="a1 a2" order="2"/>

<bond atomRefs2="a2 a3" order="1"/>

<bond atomRefs2="a3 a4" order="2"/>

<bond atomRefs2="a4 a5" order="1"/>

<bond atomRefs2="a5 a5" order="1"/>

<bond atomRefs2="a5 a6" order="2"/>

<bond atomRefs2="a6 a1" order="1"/>

<bond atomRefs2="a7 a8" order="2"/>

<bond atomRefs2="a8 a9" order="1"/>

<bond atomRefs2="a9 a10" order="2"/>

<bond atomRefs2="a10 a6" order="1"/>

<bond atomRefs2="a5 a7" order="1"/>

</bondArray>

</molecule>

</MChemicalStruct>

</MDocument>

</cml>

 


The apparent error is here:


<bond atomRefs2="a5 a5" order="1"/>


When I paste the MRV into another Marvin JS editor I get a completely normal looking structure, and exporting from that editor removes the oddity from the MRV.


I've been using both Chrome 52 and IE 11 on Win 7. I can't always reproduce this, but maybe 4/10 tries when I'm fast enough with the ctrl-Z will do it, so it seems to be persistent enough for students to run into.


I haven't tried Safari myself since I'm on Windows. Students tell me they prefer Chrome on OS/X, which is where the original reports came from.

User 870ab5b546

24-08-2016 15:26:37

Thanks, but I what I meant to ask for was the MRV that you start with, before the error is generated. And then what actions do you take to generate the error?

User 62a37f4796

24-08-2016 15:42:33

Sometimes we start with a blank canvas, sometimes with a template like the one below. It doesn't really seem to matter.


When students are asked to change the bond order from whatever is on their canvas at that time, and instead of smack on the bond, they click slightly beside it (Marvin JS  is a bit sensitive that way), a new bond will be drawn with new atoms. Then using ctrl-Z this can be "undone" (on Windows anyway). This seems to work in the majority of cases, but not always, i.e. visually all answers will be the same except the MRV of some will retain an echo, if you will, of the mistake.


Here's an example of what a student may start with, but it doesn't seem to be particular to any given structure since the original case involved an alkoxide and now we're dealing with naphthalene:


<cml>

<MDocument>

<MChemicalStruct>

<molecule molID="m1">

<atomArray>

<atom y2="1.53999998768" x2="-2.583333333333333" elementType="C" id="a1" />

<atom y2="0.76999999384" x2="-3.9170666559968" elementType="C" id="a2" />

<atom y2="-0.7701866605051737" x2="-3.9170666559968" elementType="C" id="a3" />

<atom y2="-1.5399999876800003" x2="-2.583333333333333" elementType="C" id="a4" />

<atom y2="-0.7701866605051737" x2="-1.2496000106698666" elementType="C" id="a5" />

<atom y2="0.76999999384" x2="-1.2496000106698666" elementType="C" id="a6" />

<atom y2="-1.5401866522155038" x2="0.08425431246199211" elementType="C" id="a7" />

<atom y2="-0.7700229054354417" x2="1.4177853161602955" elementType="C" id="a8" />

<atom y2="0.7699307005361937" x2="1.417946975877073" elementType="C" id="a9" />

<atom y2="1.5400005511896464" x2="0.08409265274521438" elementType="C" id="a10" />

</atomArray>

<bondArray>

<bond order="1" atomRefs2="a1 a2" />

<bond order="1" atomRefs2="a1 a6" />

<bond order="1" atomRefs2="a2 a3" />

<bond order="1" atomRefs2="a3 a4" />

<bond order="1" atomRefs2="a4 a5" />

<bond order="1" atomRefs2="a5 a6" />

<bond order="1" atomRefs2="a7 a8" />

<bond order="1" atomRefs2="a8 a9" />

<bond order="1" atomRefs2="a9 a10" />

<bond order="1" atomRefs2="a6 a10" />

<bond order="1" atomRefs2="a5 a7" />

</bondArray>

</molecule>

</MChemicalStruct>

</MDocument>

</cml>

User 870ab5b546

24-08-2016 16:09:13

I've tried to reproduce the problem in Chrome on Mac, but I'm unable to do so. I do know that at least one of my students generated a similar error at one time.

User 62a37f4796

24-08-2016 19:22:40

Good to know we're not the only one seeing this. That makes it less likely to be due (exclusively) to our technology stack.


Thanks!

ChemAxon 76c88f5366

30-08-2016 12:34:30

Hi Michiel, 


Thank you for the update, but to tell the truth I still cannot reproduce this issue. (Not in OSX Chrome or in Win 7 IE 11)


That is why I would need more information from your side.



1. Imported the attached structure (the example source which the student might start with).
2. Then selected double bond tool from the left toolbar.
3. I clicked next to the middle of one of the bonds. (far away from its end atoms)
4. Then pressed Ctrl+Z (or in OSX Command+Z).


Is this the way that worked for you? Did I miss something?



 https://marvinjs-demo.chemaxon.com/latest/examples/example-selection.html ?


(In this page you can get the molecule source each time when the drawn structure is changed in the editor,just please leave the "Retrieve mol source at mol change" checkbox ticked. This way you can see at once,when something unusual appears in the source. I think this mechanism may be very close to yours.)


If you could answer these questions, that would be a great help. 


In the meantime I keep trying to reproduce this problem. 


Thank you in advance. 


Best regards,
Eszter 

User 62a37f4796

30-08-2016 17:20:28

HI Eszter,


As far as I know, we use Marvin JS as the front end. It hands off a JSON object to JChem, and JChem turns that into an MRV. That's the normal workflow, at least.


I'm a chemist, not a software engineer, so I may not have all the answers at the ready, but I'll try my best. I'll quote one of our software engineers: "Whenever a user changes anything in the MarvinJS instance, it fires of a molChanged event. We use this event to trigger a REST call to check the user's input."


The original report has MRV code pulled out of our database using this method. This is what an actual student produced.


While investigating the possible causes for this strange behavior, we've also tried to get the MRV from Marvin JS directly using the "Export" icon.


The last set of MRVs came about that way. This is what I and a colleague of mine were able to produce.


Using this triage process we've narrowed it down to somewhere in the Marvin JS code that this odd tag is introduced. After all, if we can generate it with Marvin JS alone, intervention of JChem should not be required. Then again, maybe I'm reading the documentation incorrectly and all MRVs obtained from Marvin JS come from JChem if the webservice is enabled. Maybe you can clarify this for me.


What we have been able to assert is that when students need to change a single bond into a double bond and they use the bond tool/icon (it seems that both the single and double bond mode work that way) and they click just next to - but not on - an existing bond, a new bond with atoms will appear on the canvas; then quickly pressing ctrl-Z to undo that is the only way we've been able to reproduce creating this odd tag.


Although we've been able to reproduce the issue, it doesn't happen all the time. More like 3 or 4 out of 10 tries and you have to be pretty fast between making the "mistake" and using ctrl-Z. So perhaps there is some timing or time-lag involved since we record all onChange events.


Marvin JS is 15.8.9-pre2-edu (r29a1f12025e6+). I don't have access to the server-side so I can't give you the specifics for JChem, but it is whatever the current release was that coincides with this version of Marvin JS.


I've also tried your suggestion:


https://marvinjs-demo.chemaxon.com/latest/examples/example-selection.html


and this one too since it is closer to our educational set-up:


https://marvinjs-demo.chemaxon.com/latest/examples/example-lonepair.html


and neither one produces the odd tag for me. (They run Marvin JS 16.8.15.2 (r0e73158d4211) I'm told.)


Let me know if I can contribute anything else to solving this puzzle.


Thanks,


   Michiel

ChemAxon 76c88f5366

01-09-2016 10:46:30

Hi Michiel,


I am sorry, but I still cannot reproduce this issue.That is why, to get to know more about the nature of this phenomenon, we need your help. 


We set up a test environment , and I would like to ask you, if you could help us with checking this.


Whether it is possible to reproduce this issue or not,  both would give us more information about the case.


I sent you an email with the details.


Please, let me know if the message did not reach you.


Best regards,
Eszter 

ChemAxon f052bdfe3c

30-09-2016 11:48:00

I am glad to inform you that we were able to reproduce this issue, fixed it and the fix will be released in our next version 16.10.3.


Thank you for your help.


Best regards,


Efi